package pl.kemot.impl.customer.all;

import java.util.List;

import pl.kemot.IPresenterComponentRemove;
import pl.kemot.customer.all.IPresenterCustomerAll;
import pl.kemot.customer.all.IViewCustomerAll;
import pl.kemot.impl.Context;
import pl.kemot.model.CustomerBO;
import pl.kemot.model.CustomerDTO;

public class PresenterCustomerAllImpl implements IPresenterCustomerAll {

	private CustomerBO customerBO;
	private IViewCustomerAll viewCustomerAll;
	private IPresenterComponentRemove presenterComponentRemove;

	public PresenterCustomerAllImpl() {
	}

	@Override
	public void setCustomerBO(CustomerBO customerBO) {
		this.customerBO = customerBO;
	}

	@Override
	public void setViewCustomerAll(IViewCustomerAll viewCustomerAll) {
		this.viewCustomerAll = viewCustomerAll;
	}

	@Override
	public void setPresenterComponentRemove(IPresenterComponentRemove presenterComponentRemove) {
		this.presenterComponentRemove = presenterComponentRemove;
	}

	@Override
	public void perform(Context context) {
		List<CustomerDTO> list = customerBO.getList();
		viewCustomerAll.setCustomer(list);
	}
}
